//This class is for testing purposes only
package com.main;

import com.restfb.Connection;
import com.restfb.types.Post;
import com.main.AttendeeList;

import com.main.FacebookConnection;

public class TestAttendees {

	/**
	 * @param args
	 */
	public static void main(String[] args) {

		Connection<Post> u_attendee_connection = getConnection();
		AttendeeList aList = new AttendeeList(u_attendee_connection);		
		//Testing getAttendees()
		System.out.println("AttendeeLest.getAttendees(): " + aList.getAttendees());		
		//Testing AttendeeLest.toString()
		System.out.println("AttendeeLest.toString(): " + aList.toString());		
		//Testing Attendee.getID
		System.out.println("GetAttendee 0 ID: " + aList.getAttendees().get(0).getID());		
		//Testing Attendee.getID
		System.out.println("GetAttendee 1 Name: " + aList.getAttendees().get(1).getName());
		//Testing  getAttendeeByName(String ID)
		System.out.println("GetAttendee by ID=590265921: " + aList.getAttendeeByID("590265921"));
		//Testing  getAttendeeByName(String Name)
		System.out.println("GetAttendee by Name=George Kolostoumpis: " + aList.getAttendeeByName("George Kolostoumpis"));
	}
	
	//This method is for testing purposes only.
	private static Connection<Post> getConnection()
	{
		String u_eID = "176714329034225";
		String accessToken = "2227470867%7C2.EnUpl8_NSU3im5F_N1Na8g__.3600.1299301200-1283973006%7CQRQX6U-V_SdvrIS487tr8IoLzq4";
		FacebookConnection fc = new FacebookConnection(accessToken);
		String connection = u_eID + "/attending";
		Connection<Post> u_attendee_connection = fc.runConnection(connection,Post.class);
		return u_attendee_connection;
	}

}
